package cn.wit.front.controller;


import cn.wit.front.condition.BaoyanHistoryInfoCondition;
import cn.wit.front.service.BaoyanHistoryInfoService;
import cn.wit.utils.response.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/baoyan")
@CrossOrigin
@Api(tags = "保研浏览记录")
public class BaoyanHistoryInfoController {
    private Logger logger = LoggerFactory.getLogger(BaoyanHistoryInfoController.class);
    @Autowired
    private BaoyanHistoryInfoService baoyanHistoryInfoService;

    @PostMapping("/insertBaoyanHistoryInfo")
    @ApiOperation("保研信息历史记录新增")
    public Result insertBaoyanHistoryInfo(@RequestBody BaoyanHistoryInfoCondition condition) {
        return this.baoyanHistoryInfoService.insertBaoyanHistoryInfo(condition);
    }

    @PostMapping("/recommandBaoyan")
    @ApiOperation("保研推荐")
    public Result recommandBaoyan(String username) {
        return baoyanHistoryInfoService.recommandBaoyan(username);
    }
}
